﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Opp_popup.aspx.vb" Inherits="Slxt.Opp_popup" %>

<%@ Register TagPrefix="cc1" Namespace="Mysoft.PubProject.Business" Assembly="Mysoft.PubProject.Business" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head runat="server">
    <title></title>
    <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
    <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
    <meta content="JavaScript" name="vs_defaultClientScript">
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    <link rel="stylesheet" type="text/css" href="/_grid/map_grid.css">
    <link rel="stylesheet" type="text/css" href="/_nav/menu.css">
    <link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
    <link rel="stylesheet" type="text/css" href="/_controls/find/find.css">
    <link rel="stylesheet" type="text/css" href="/_common/styles/global.css">

    <script language="javascript" src="/_common/scripts/global.js"></script>

    <script language="javascript" src="/_controls/settings.aspx"></script>

    <script language="javascript" src="/_controls/util/util.js"></script>

    <script language="javascript" src="/_controls/datetime/date.js"></script>

    <script language="javascript" src="/_controls/number/number.js"></script>

    <script language="javascript" src="/_controls/find/find.js"></script>

    <script language="javascript" src="/slxt/js/Public.js"></script>

    <!-- ProjTree --><LINK href="/pubproject/_controls/CRMControls/ProjTree.css" type="text/css" rel="stylesheet">
		<script language="javascript" src="/_controls/lookup/map_LookupDialogs.js"></script>

    <script language="javascript">
   
        function Checked()
        {
            var arrTr = ProjTree1.getSelectedRows();
			if (!arrTr) return;
				
			var oTr = arrTr[0];
			if (oTr.LevelType == "项目")
			{
			    if(oTr.IfEnd != "1" )
			    {
			      alert("请选择最末级项目");
				  return;
				 }
				else
				{	
				    var sProjGUID=oTr.oid;
			        if(sProjGUID == document.all("txtProjGUID").value)
                    {
                        alert("不允许向当前项目复制机会！");
                        return;
                    }
                    
                    window.returnValue=sProjGUID;
                    window.close();
				}
				
			}
			else
			{
				alert("请选择项目");
				return;
			}        
        }
    </script>

</head>
<html>
<body ms_positioning="FlowLayout"> <form id="Form2" method="post" runat="server" style="DISPLAY:inline"> 
    <table id="appQuery" style="font-size: 9pt" height="100%" border="0" cellspacing="0"
        cellpadding="0" width="100%">         
        <tr height="40px" >
           <td class="main" vAlign="top">
						<table height="100%" cellSpacing="0" cellPadding="0" width="100%">
							<tr height="20">
								<td class="wizHead">请选择项目：</td>
							</tr>
							<tr height="1">
								<td></td>
							</tr>
							<tr>
								<td>  <cc1:projtree id="ProjTree1" runat="server" IsSelectMuti="False" ontreedblclick="Checked()" IsSelectAll="False" IsUserProjFilter="True"
										defaultexpandlevel="2" ></cc1:projtree> 
                            <asp:textbox id="txtProjGUID" runat="server" style="DISPLAY: none"></asp:textbox></td>
							</tr>
						</table>
					</td>
           
         </tr>
        <tr>
           <td>                       
           </td>
        </tr>          
        <tr  height="40px">
           <td class="buttons" >
                <input type="button" value="确定" onclick="Checked()" />&nbsp;&nbsp; <button onclick="window.close();" id="btnCancel" type="button">
							取 消</button>
               
            </td>
        </tr>
    </table>  </form>    
</body>
</html>
